package com.diaohw.module.metadata.obj.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.diaohw.module.metadata.obj.vo.MetaVO;
import com.diaohw.platform.framework.db.obj.BaseModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serial;

/**
 * <p>
 * 元数据版本号
 * </p>
 *
 * @author D-Hw
 * @since 2025-04-07
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName(value = "META_VERSION", autoResultMap = true)
@Schema(name = "MetaVersionDO", description = "元数据版本号")
public class MetaVersionDO extends BaseModel<MetaVersionDO> {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 源数据ID
     */
    @Schema(description = "源数据ID")
    @TableField("TABLE_ID")
    private String tableId;

    /**
     * 源数据编号
     */
    @Schema(description = "源数据编号")
    @TableField("TABLE_CODE")
    private String tableCode;

    /**
     * 元数据名称
     */
    @Schema(description = "元数据名称")
    @TableField("TABLE_NAME")
    private String tableName;

    /**
     * 元数据配置
     */
    @Schema(description = "元数据配置")
    @TableField(value = "TABLE_DATA", typeHandler = JacksonTypeHandler.class)
    private MetaVO tableData;

    /**
     * 版本号
     */
    @Schema(description = "版本号")
    @TableField("VERSION_")
    private String version;


}
